package com.dc.kylin.timedscheduling.service.impl;

import com.dc.kylin.timedscheduling.config.ScheduleTaskConfig;
import com.dc.kylin.timedscheduling.service.SchedulingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class SchedulingServiceImpl implements SchedulingService {

    @Autowired
    private ScheduleTaskConfig scheduleTaskConfig;

    @Override
    public String updateCronSchedule(String cronExpression) {
        scheduleTaskConfig.setCronExpression(cronExpression);
        return "修改定时任务cron成功,修改后的值为："+cronExpression;
    }
}
